package com.hebeu.gfh.service.impl;

import com.hebeu.gfh.mapper.clubLikeMapper;
import com.hebeu.gfh.pojo.po.ClubLike;
import com.hebeu.gfh.service.clubLikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: 刘剑利
 * @Version: v1.0
 */
@Service("clubLikeService")
public class clubLikeServiceImpl implements clubLikeService {
    @Autowired
    clubLikeMapper clubLikeMapper;

    @Override
    public void addLike(ClubLike clubLike) {
        clubLikeMapper.addLike(clubLike);
    }

    @Override
    public int isLike(ClubLike clubLike) {
        int islike = clubLikeMapper.islike(clubLike);
        return islike;
    }

    @Override
    public int getLikeNum(int clubId) {
        int likeNum =clubLikeMapper.getLikeNum(clubId);
        return likeNum;
    }

    @Override
    public void deleteLike(ClubLike clubLike) {
        clubLikeMapper.deleteLike(clubLike);
    }
}
